package tds.model27;
/**
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName ConcreteChess
 * @Description 具体享元类，棋子类
 * @author tds
 * @Date 2020/2/8 16:04
 * @version 1.0.0
 */
public class ConcreteChess implements ChessFlyWeight {

    private String color;

    public ConcreteChess(String color) {
        this.color = color;
    }

    @Override
    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public void display(Coordinate coordinate) {
        System.out.println("棋子" + color + ",坐标：(" + coordinate.getX() + "," + coordinate.getY() + ")");
    }
}
